package com.testmanager.testmananger.quantitative.domain;

import com.testmanager.testmananger.foundation.domain.AbstractAuditingEntity;
import com.testmanager.testmananger.quantitative.constants.DemandType;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Entity
@Data
@Table(name = "yx_demand_info")
@Accessors(chain = true)
public class DemandInfoEntity extends AbstractAuditingEntity implements Serializable {


    private static final long serialVersionUID = -2748654466845355420L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @Column(name = "iteration_id")
    private long iterationId;
    @Column
    @NotNull(message = "迭代名称不能为空")
    private String name;
    @Column
    @Convert(converter = DemandTypeConvert.class)
    private DemandType type;
    @Column(name = "demandno")
    private long demandNo; //id+01
    @Column(name = "demand_url",length = 100)
    private String demandURL;
    @Column(name = "ui_url",length = 100)
    private String uiURL;
    @Column(name = "prototype_url",length = 100)
    private String protoTypeURL;
    @Column(name = "review_date")
   // @Temporal(TemporalType.DATE)
    private LocalDateTime reviewDate;
    @Column(name = "extra_message",length = 200)
    private String extraMessage;

}
